<?php 
class comment_model extends CI_Model
{
		public function add_comment($inputdata)
		{
			$this->db->insert('comment',$inputdata);
			redirect('comment/Addcomment/'.$inputdata['t_id']);
		}
		//--//
		public function detail_comment($t_id)
		{
			$this->db->where('t_id',$t_id);
			$this->db->order_by("comment_id", "desc"); 
			$rs=$this->db->get("comment");
			return $data['rs'] = $rs->result_array();
		}
}
?>